let STORAGE = function (){
    return {
        setStorageState(params){
            let cacheState = localStorage.getItem('vue_state') || "{}";
            cacheState = JSON.parse(cacheState)
            localStorage.setItem('vue_state', JSON.stringify({
                ...cacheState,
                ...params
            }));
        },
        getStorageKey(key, defaultValue){
            let cacheState = localStorage.getItem('vue_state') || "{}";
            cacheState = JSON.parse(cacheState)
            return cacheState[key] || defaultValue
        },
    }
}();
export default STORAGE;